﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;

namespace Hmc.IM.Common.UserControls
{
    /// <summary>
    /// 
    /// </summary>
    public partial class ucGroupBox : UserControl
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public ucGroupBox()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ucGroupBox_Paint(object sender, PaintEventArgs e)
        {
            DrawVisualStyleElement_Button_GroupBox(e);
        }

        /// <summary>
        /// 绘制边框
        /// </summary>
        /// <param name="e"></param>
        public void DrawVisualStyleElement_Button_GroupBox(PaintEventArgs e)
        {
            if (VisualStyleRenderer.IsElementDefined(
                VisualStyleElement.Button.GroupBox.Normal))
            {
                VisualStyleRenderer renderer =
                     new VisualStyleRenderer(VisualStyleElement.Button.GroupBox.Normal);
                Rectangle rectangle1 = new Rectangle(0, 0, this.Width, this.Height);
                renderer.DrawBackground(e.Graphics, rectangle1);
            }
        }
    }
}
